import json

from api.base_service import BaseService


# 用户服务
class UserServiceApi(BaseService):
    # 根据用户名查询用户信息
    def find_by_username(self, string):
        resp = self.client.invoke("UserService", "findByUsername", string)
        if resp == 'null':
            return None
        else:
            return json.loads(resp)
